package testJdk.io.scanner;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

/**
 * @ClassName : learn_jdk.io.scanner.ReadData
 * @Description : 类描述
 * Created by cyd on 2021-04-29 23:36:42
 */
public class ReadData {
    public static void main(String[] args) throws FileNotFoundException {
        File file = new File("test.txt");
        Scanner input = new Scanner(file);
        while (input.hasNextLine()) {
            String s = input.nextLine();
            System.out.println(s);
        }
        input.close();

    }
}
